/*
 * @Author       : xiangmin
 * @File         : 这是一个鉴权用的自定义指令
 * @Date         : 2023-01-05 09:54:58
 * @LastEditors  : xiangmin
 * @LastEditTime : 2023-06-14 16:20:30
 */
import type { ObjectDirective } from 'vue'

const auth: ObjectDirective<HTMLElement, boolean> = {
	mounted(element, binding) {
		if (!binding.value) {
			element.parentNode!.removeChild(element)
		}
	}
}

export default auth
